#include <stdio.h>
#include <math.h>

int main(){
	long long int i, r, t = 0, j;
	double tmp;
	if (scanf("%lld %lld", &i, &j) == 2)
		for(i = 1; i <= j; i++){
			r = i*(i + 1)/2;
			tmp = sqrt(r);
			if (tmp - floor(tmp) == 0){
				printf("Triangular-Square number found: %lld\n",
					r);
				printf("Corresponding n: %lld\n\n", i);
				t++;
			}
		}
	printf("result : %lld\n", t);
	return 0;
}
